//
//  XLUserDefaults.h
//  campus
//
//  Created by xl on 2019/11/27.
//  Copyright © 2019 xl. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface XLUserDefaults : NSUserDefaults

/** 保存上次手机登录的账号 **/
+ (void)saveLastLoginPhone:(NSString *)phone;
+ (NSString *)getLastLoginPhone;

//服务器时间戳和本地时间戳的差
+ (void)updateServerDiffTime:(NSTimeInterval)diffTime;
+ (NSTimeInterval)getServeDiffTime;

//存储上次登录用户信息
+ (void)saveCurrentLoginUserJson:(NSData *)data;
+ (NSData *)getCurrentLoginUserInfoJson;

/** 保存上次有效token **/
+ (void)saveLastAvailableToken:(NSString *)token;
+ (NSString *)getLastAvailableToken;

/** 存储用户登录密码 */
+ (void)saveLastLoginPassword:(NSString *)password;
+ (NSString *)getLastLoginPassword;

/** 存储下次登录方式 */
+ (void)saveLastLoginWay:(XLLoginWayType)type;
+ (NSInteger)getLastLoginWay;

/** 存储数字密码 */
+ (void)saveLastNumPassword:(NSString *)password;
+ (NSString *)getLastNumPassword;

/** 存储手势密码 */
+ (void)saveLastGesturePassword:(NSString *)password;
+ (NSString *)getLastGesturePassword;

/** 头像路径存储 */
+ (void)saveAvaterPath:(NSString *)path;
+ (NSString *)getAvaterPath;

@end


